package net.zoneland.knowledge.controller.bean;

import java.util.Date;
import java.util.Optional;

public class FootPrint {

    /**
     * 足迹类型
     */
    private String category;

    /**
     * 一级栏目
     */
    private String level1Title;

    /**
     * 问题内容
     */
    private String queryText;

    /**
     * 足迹时间
     */
    private Date createTime;

    /**
     * 时间，已经转成MM-dd格式
     */
    private String time;

    /**
     *访问方式，pc/moa
     */
    private String visitType;

    /**
     * 回答内容
     */
    private String ansContent;

    /**
     * 点击查询.
     * <p>
     *     0：输入查询；1：点击查询；
     * </p>
     */
    private int clickSearch;

    /**
     * 获取值.
     * return the category
     */
    public String getCategory() {
        return category;
    }

    /**
     * 赋值.
     *
     * @param category 值
     */
    public void setCategory(String category) {
        this.category = category;
    }

    /**
     * 获取值.
     * return the level1Title
     */
    public String getLevel1Title() {
        return level1Title;
    }

    /**
     * 赋值.
     *
     * @param level1Title 值
     */
    public void setLevel1Title(String level1Title) {
        this.level1Title = level1Title;
    }

    /**
     * 获取值.
     * return the queryText
     */
    public String getQueryText() {
        return queryText;
    }

    /**
     * 赋值.
     *
     * @param queryText 值
     */
    public void setQueryText(String queryText) {
        this.queryText = queryText;
    }

    /**
     * 获取值.
     * return the createTime
     */
    public Date getCreateTime() {
        return Optional.ofNullable(createTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * 赋值.
     *
     * @param createTime 值
     */
    public void setCreateTime(Date createTime) {
        this.createTime = Optional.ofNullable(createTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * 获取值.
     * return the time
     */
    public String getTime() {
        return time;
    }

    /**
     * 赋值.
     *
     * @param time 值
     */
    public void setTime(String time) {
        this.time = time;
    }

    /**
     * 获取值.
     * return the visitType
     */
    public String getVisitType() {
        return visitType;
    }

    /**
     * 赋值.
     *
     * @param visitType 值
     */
    public void setVisitType(String visitType) {
        this.visitType = visitType;
    }

    public String getAnsContent() {
        return ansContent;
    }

    public void setAnsContent(String ansContent) {
        this.ansContent = ansContent;
    }

    public int getClickSearch() {
        return clickSearch;
    }

    public void setClickSearch(int clickSearch) {
        this.clickSearch = clickSearch;
    }

    @Override
    public String toString() {
        return "FootPrint{" +
                "category='" + category + '\'' +
                ", level1Title='" + level1Title + '\'' +
                ", queryText='" + queryText + '\'' +
                ", createTime=" + createTime +
                ", time='" + time + '\'' +
                ", visitType='" + visitType + '\'' +
                ", ansContent='" + ansContent + '\'' +
                ", clickSearch=" + clickSearch +
                '}';
    }
}
